package com.zephyr.vchcenter.bpm.action;

import org.apache.log4j.Logger;
import org.springframework.context.ApplicationContext;

import com.hiaward.bpm.action.TaskAction;
import com.hiaward.bpm.context.ServiceContext;
import com.hiaward.bpm.exception.ParameterException;
import com.hiaward.bpm.exception.ServiceException;
import com.hiaward.framework.taskmanage.service.Service;
import com.zephyr.vchcenter.bean.Voucher;
import com.zephyr.vchcenter.bpm.util.RandomUtil;
import com.zephyr.vchcenter.dao.IBaseDao;
import com.zephyr.vchcenter.helper.SpringHelper;

public class IdentifyVerifyAction extends TaskAction {
	private final Logger log = Logger.getLogger(IdentifyVerifyAction.class);

	public void perform(ServiceContext arg0) throws ServiceException,
			ParameterException {
		log.debug("���进入IdentifyVerifyAction........");
		String vchsid = (String)arg0
		.getInputParameterValue("vchsid");
		String idstate = (String) arg0
				.getInputParameterValue("idstate");
		IBaseDao dao=(IBaseDao)SpringHelper.getBean("baseDao");
        Voucher voucher=(Voucher)dao.findById("Voucher", vchsid);
        
        voucher.setIdstate(idstate);
        dao.saveOrUpdate(voucher);
		log.debug("�离开IdentifyVerifyAction......");
	}

	public void serviceExceptionHandle(ServiceContext arg0,
			ServiceException arg1) {

	}

}
